<html>
<head><meta charset="utf-8"><title>beta validations · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html">beta validations</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="214117926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214117926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214117926">(Oct 21 2020 at 21:36)</a>:</h4>
<p><span class="user-mention" data-user-id="255061">@LeSeulArtichaut</span> and I were talking <a href="#narrow/stream/245100-t-compiler.2Fwg-prioritization.2Falerts/topic/I-prioritize.20.2378192.20InstCombine.20introduces.20an.20incorrect.20use.E2.80.A6/near/214117332">here</a> about a mir-opt bug, and they said they thought you guys ran a validator for each beta to make sure there aren't bugs. Is that true? If so, do you use crater? Thanks for satisfying my curiosity!</p>



<a name="214118162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214118162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214118162">(Oct 21 2020 at 21:38)</a>:</h4>
<p>No, there is a validation pass that checks some MIR invariants. It runs once before codegen by default, and after every pass when <code>-Zvalidate-mir</code> is passed.</p>



<a name="214118304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214118304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214118304">(Oct 21 2020 at 21:40)</a>:</h4>
<p>Ah, so if I just use <code>cargo build</code> on a project it will run the validator once after all the optimizations, but in CI you run it after each pass?</p>



<a name="214118387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214118387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214118387">(Oct 21 2020 at 21:41)</a>:</h4>
<p>I don't think we use <code>-Zvalidate-mir</code> in CI, it's mostly for local development and narrowing down which pass introduced the incorrect MIR</p>



<a name="214118536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214118536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214118536">(Oct 21 2020 at 21:42)</a>:</h4>
<p>IIRC there are MIR tests in the test suite though?</p>



<a name="214118585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214118585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214118585">(Oct 21 2020 at 21:43)</a>:</h4>
<p>IIUC they are just checking the MIR output against a file, like UI tests, is that correct?</p>



<a name="214118606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214118606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214118606">(Oct 21 2020 at 21:44)</a>:</h4>
<p>The mir tests in the test suite run the mir validator after every mir pass. During normal compilation I think we run it only on the final MIR</p>



<a name="214120197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214120197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214120197">(Oct 21 2020 at 21:59)</a>:</h4>
<p>I'm interested in doing some MIR stuff: What is the best place to read more about MIR and MIR opts? Would it be the dev-guide?</p>



<a name="214120307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214120307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214120307">(Oct 21 2020 at 22:00)</a>:</h4>
<p>There are chapters in the guide about the MIR and MIR opts</p>



<a name="214120341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214120341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214120341">(Oct 21 2020 at 22:01)</a>:</h4>
<p>Just wasn't sure how up-to-date those are :)</p>



<a name="214120584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214120584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214120584">(Oct 21 2020 at 22:02)</a>:</h4>
<p>I don't think anything major has happened since then but <span aria-label="shrug" class="emoji emoji-1f937" role="img" title="shrug">:shrug:</span></p>



<a name="214120630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214120630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214120630">(Oct 21 2020 at 22:03)</a>:</h4>
<p>We're back to <a href="https://github.com/rust-lang/rustc-dev-guide/issues/924">rustc-dev-guide#924</a> <span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span></p>



<a name="214120832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214120832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214120832">(Oct 21 2020 at 22:05)</a>:</h4>
<p>It would be nice if there were any easier way to update all the docs for something when someone does a PR... Maybe I can make some kind of tool...</p>



<a name="214120859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214120859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214120859">(Oct 21 2020 at 22:05)</a>:</h4>
<p>We had discussed watching the MCPs I think</p>



<a name="214120949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214120949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214120949">(Oct 21 2020 at 22:06)</a>:</h4>
<p>Even small changes need to update docs though</p>



<a name="214121011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214121011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214121011">(Oct 21 2020 at 22:06)</a>:</h4>
<p>Moving conversation to <a class="stream" data-stream-id="131828" href="/#narrow/stream/131828-t-compiler">#t-compiler</a></p>



<a name="214121066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214121066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214121066">(Oct 21 2020 at 22:07)</a>:</h4>
<p>(or <a class="stream" data-stream-id="196385" href="/#narrow/stream/196385-t-compiler.2Fwg-rustc-dev-guide">#t-compiler/wg-rustc-dev-guide</a>)</p>



<a name="214121656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/beta%20validations/near/214121656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/beta.20validations.html#214121656">(Oct 21 2020 at 22:13)</a>:</h4>
<p>Moved to <a href="#narrow/stream/131828-t-compiler/topic/tool.20to.20keep.20docs.20up.20to.20date">https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/tool.20to.20keep.20docs.20up.20to.20date</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>